package enemies;

import java.awt.Dimension;
import java.awt.geom.Point2D;
import java.util.ArrayList;

import javax.swing.ImageIcon;

import projectiles.Bullet;
import projectiles.Projectile;

/**
 * @author onbekend
 * @version 1.1
 * @since 2011-04-11
 */
public class Jeep extends MobileEnemy {

	private static final ImageIcon image = new ImageIcon("images/jeep.gif");
	private static final ImageIcon deviceImage = new ImageIcon("images/jeepgun.gif");

	/**
	 * 
	 * @param route de route
	 * @param position de positie
	 * @param health de hitpoints
	 * @param speed de snelheid van de unit
	 */
	/* /// Constructor //////////////////////////////////////// */
	public Jeep(ArrayList<Point2D.Double> route, Point2D.Double position, int health, int speed) {
		super(route, position, health, new Dimension(image.getIconWidth(), image.getIconHeight()), image, 500, 200,
				speed, deviceImage, 0);
	}

	/* /// shoot //////////////////////////////////////// */
	public Projectile shoot() {
		updateFirerate();

		return new Bullet(this, getPosition(), deviceAngle, aimAtTower.getMiddle());
	}

}
